<?php

namespace App\Http\Controllers\User;

use App\Http\Controllers\Controller;
use App\Repositories\FavorsRepositories;
use Illuminate\Http\Request;

class FavorsController extends Controller
{
    protected $repo;

    public function __construct(FavorsRepositories $repo)
    {
        $this->repo = $repo;
    }

    public function index()
    {
        $favors = $this->repo->list();
        return view('user.favors', compact('favors'));
    }

    public function store(Request $request)
    {
        return $this->repo->save($request);
    }
}
